//
//  AddressTableViewCell.m
//  XingRun
//
//  Created by 赵颜彬 on 17/1/12.
//  Copyright © 2017年 赵颜彬. All rights reserved.
//

#import "AddressTableViewCell.h"

@implementation AddressTableViewCell


- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"商城背景"]];
        [self.contentView addSubview:_img];
        
        self.Bian = [UIButton buttonWithType:UIButtonTypeCustom];
        [_Bian setTitle:@"编辑" forState:UIControlStateNormal];
        [_Bian setTitleColor:[UIColor blackColor]forState:UIControlStateNormal];
        _Bian.titleLabel.font = [UIFont fontWithName:@"Heiti SC" size:14];
        [self.img addSubview:_Bian];
        
        self.name = [[UILabel alloc] init];
        _name.text = @"买家姓名:xxx";
        _name.font = [UIFont fontWithName:@"Heiti SC" size:14];
        [self.img addSubview:_name];
        
        
        self.phone = [[UILabel alloc] init];
        _phone.text = @"手机号码:xxxxxxxxxx";
        _phone.font = [UIFont fontWithName:@"Heiti SC" size:14];
        [self.img addSubview:_phone];
        
        self.add = [[UILabel alloc] init];
        _add.text = @"地址:xx省  xx市  xx区";
        _add.font = [UIFont fontWithName:@"Heiti SC" size:14];
        [self.img addSubview:_add];
        
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    _img.frame = CGRectMake(10 * WIDTH, 10 * HEIGHT, 355 * WIDTH, 80 * HEIGHT);
    _Bian.frame = CGRectMake(310 * WIDTH, 30 * HEIGHT, 40 * WIDTH, 20 * HEIGHT);
    _name.frame = CGRectMake(10 * WIDTH, 10 * HEIGHT, 150 * WIDTH, 30 * HEIGHT);
    _phone.frame = CGRectMake(180 * WIDTH, 10 * HEIGHT, 120 * WIDTH, 30 * HEIGHT);
    _add.frame = CGRectMake(10 * WIDTH, 50 * HEIGHT, 200 * WIDTH, 30 * HEIGHT);
    
    
}
- (void)addContactTarget:(id)target Action:(SEL)action{
    [_Bian addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
}

@end
